function showTip(sms, icon, fun, t) {
    if (!t) {
        t = 1000;
    }
    wx.showToast({
        title: sms,
        icon: icon,
        duration: t,
        success: fun
    })
}

function showModal(c, t, fun, showCancel, confirmText) {
    if (!confirmText) confirmText = '确定'
    if (!t)
        t = '提示'
    if (showCancel == undefined)
        showCancel = false;

    wx.showModal({
        title: t, confirmText: confirmText,
        content: c,
        showCancel: showCancel,
        success: fun
    })
}
 


module.exports.showTip = showTip;
module.exports.showModal = showModal; 